package com.qf.team2.netdisc.common.pojo.qo;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;

import java.util.Objects;

/**
 * 分享链接参数实体
 *
 * @author Simon_Wong
 * @date 2021/05/26 10:23
 */
@SuppressWarnings("AlibabaClassNamingShouldBeCamel")
@Api("前端返回的对象类型")
public class ShareLinkQO {
    @ApiModelProperty("验证码，结果为\"\"则默认使用系统生成的字符串，否则使用自定义字符串")
    private String codeVal;
    @ApiModelProperty("分享的有效期，单位为天，需要转换为毫秒。有效期分为30天、7天、1天，永久有效时为空字符串")
    private String agingVal;
    @ApiModelProperty("文件ID，由页面渲染获得")
    private String fileIdVal;
    @ApiModelProperty("用户ID，由页面渲染获得")
    private String userIdVal;

    public ShareLinkQO() {
    }

    public ShareLinkQO(String codeVal, String agingVal, String fileIdVal, String userIdVal) {
        this.codeVal = codeVal;
        this.agingVal = agingVal;
        this.fileIdVal = fileIdVal;
        this.userIdVal = userIdVal;
    }

    public String getCodeVal() {
        return codeVal;
    }

    public void setCodeVal(String codeVal) {
        this.codeVal = codeVal;
    }

    public String getAgingVal() {
        return agingVal;
    }

    public void setAgingVal(String agingVal) {
        this.agingVal = agingVal;
    }

    public String getFileIdVal() {
        return fileIdVal;
    }

    public void setFileIdVal(String fileIdVal) {
        this.fileIdVal = fileIdVal;
    }

    public String getUserIdVal() {
        return userIdVal;
    }

    public void setUserIdVal(String userIdVal) {
        this.userIdVal = userIdVal;
    }

    @Override
    public String toString() {
        return "ShareLinkQO{" +
                "codeVal='" + codeVal + '\'' +
                ", agingVal='" + agingVal + '\'' +
                ", fileIdVal='" + fileIdVal + '\'' +
                ", userIdVal='" + userIdVal + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ShareLinkQO that = (ShareLinkQO) o;
        return Objects.equals(codeVal, that.codeVal) && Objects.equals(agingVal, that.agingVal) && Objects.equals(fileIdVal, that.fileIdVal) && Objects.equals(userIdVal, that.userIdVal);
    }

    @Override
    public int hashCode() {
        return Objects.hash(codeVal, agingVal, fileIdVal, userIdVal);
    }
}
